SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for tms_product_follow_log_attachment
-- ----------------------------
DROP TABLE IF EXISTS `tms_product_follow_log_attachment`;
CREATE TABLE `tms_product_follow_log_attachment` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `follow_log_id` bigint NOT NULL COMMENT '关联的跟进记录ID',
  `attachment_name` varchar(255) NOT NULL COMMENT '附件名称',
  `attachment_url` varchar(512) NOT NULL COMMENT '附件URL',
  `attachment_type` varchar(50) NOT NULL COMMENT '附件类型',
  `sort` int NOT NULL DEFAULT '0' COMMENT '附件排序',
  `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '创建者',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '更新者',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
  `tenant_id` bigint NOT NULL DEFAULT '0' COMMENT '租户编号',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_follow_log_id` (`follow_log_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='产品跟进记录附件';

-- ----------------------------
-- Records of tms_product_follow_log_attachment
-- ----------------------------
BEGIN;
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;